<template>
	<view class="window-top">
		<view class="window-flex">
			<view class="window-box">
				<scroll-view class="window-scroll" :scroll-y="false">
					<view class="tn-gradient-bg__cool-6 top-font-title" style="width: 100%; height: 100%;">
						<view style="width: 100%; display: flex;flex-direction: column;align-items: center;">
							<!-- 顶部占位 -->
							<view :style="'height:'+sConf.tH+'px;'"> </view>
							<!-- 标题 -->
							<view style="padding: 40px 0;font-size: large;font-weight: bold;color: #fff;"> 个人信息 </view>
						</view>
						<!-- 正文 -->
						<cUserinfoVue ref="ueInfo"></cUserinfoVue>
						<!-- 顶部自定义导航 -->
						<tn-navbar :placeholder="true" fixed bg-color="#FFFFFF00" text-color="#fff"> {{title}}
						</tn-navbar>
					</view>
				</scroll-view>
			</view>
		</view>
	</view>
</template>

<script>
	import utils from '@/common/utils';
	import cUserinfoVue from '../components/c-userinfo/c-userinfo.vue';
	export default {
		data() {
			return {
				title: '悦君玺 • 重庆',
				sConf: getApp().globalData,
				curStaff: null
			}
		},
		onLoad() {
			// this.loadUserinfoData(this.sConf.auth.id)
		},
		onShow() {
			// this.$refs.ueInfo.loadDefData(this.sConf.auth)
		},
		onReady() {
			this.$refs.ueInfo.loadUserinfoData(this.sConf.auth.id)
		},
		components: {
			cUserinfoVue
		},
		methods: {
			stickyChange(e) {
				console.log('stickyChange', e);
			},
			/**
			 * 加载个人信息
			 */
			loadUserinfoData(e) {
				let host = this.sConf.host + '/weapps/userinfo/' + e + '/';
				let token = this.sConf.token || '';
				utils.authenticatorRead(host, token).then((res) => {
					console.log('加载个人信息', res);
					if (res.rescode === 200) {
						this.curStaff = res.resmsg
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>

</style>